#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <fstream>
using namespace std;

int main()
{
	ofstream p;
	p.open("text.txt", ios::out);
	p << "7\t8\t9\n";
	p << "1\t\t2\t\t3\n";
	p.close();
	ifstream q;
	char m[20];
	q.open("text.txt", ios::in);
	char buf[1024];
	char a = '\t';
	q.getline(buf, sizeof(buf), a);
	cout << buf;
	q.getline(buf, sizeof(buf), a);
	cout << buf;
	q.getline(buf, sizeof(buf), '\n');
	cout << buf;
	cout << endl;

	q.getline(buf, sizeof(buf), a);
	cout << buf;
	q.getline(buf, sizeof(buf), a);
	
	q.getline(buf, sizeof(buf), a);
	cout << buf;
	q.getline(buf, sizeof(buf), a);

	q.getline(buf, sizeof(buf), '\n');
	cout << buf;
	return 0;
}